// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成
package com.fowo.api.controller;

import com.fowo.api.common.model.R;
import com.fowo.api.model.supplier.flow.form.relation.SupplierFlowFormRelationSearchParamPo;
import com.fowo.api.model.supplier.report.SupplierReportSelectParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectResult;
import com.fowo.api.service.impl.SupplierReportServiceImpl;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@Tag(name = "供应商报表")
@RequestMapping("/api/supplier-report")
@RestController
public class SupplierReportController {

  @Resource
  private SupplierReportServiceImpl service;
  @Operation(summary = "获取任务分析数据")
  @GetMapping("SelectNavTask")
  public R<Map> selectNavTask(
          SupplierFlowFormRelationSearchParamPo param
  ) {
    return R.data(() -> service.selectNavTask(param));
  }
  @Operation(summary = "获取供应商报表数据")
  @GetMapping("SelectSpeedRateAndScore")
  public R<SupplierReportSelectResult> selectSpeedRateAndScore(
          SupplierReportSelectParam param
  ) {
    return R.data(() -> service.supplierReport(param));
  }

}
